body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #f4f4f4;
}

.container {
    text-align: center;
}

#array-container {
    display: flex;
    align-items: flex-end; /* 使元素底部对齐 */
    justify-content: center;
    margin-bottom: 20px;
    height: 300px; /* 固定容器高度 */
}

.array-element {
    width: 30px;
    background-color: #4CAF50; /* 默认颜色 */
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: height 0.3s ease, background-color 0.3s ease; /* 添加过渡效果 */
}

.array-element.sorted {
    background-color: #008CBA; /* 已排序元素的颜色 */
}

.controls {
    margin-top: 20px;
}

button, select {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #008CBA;
    color: white;
    border: none;
    border-radius: 5px;
    margin: 5px;
}

button:hover, select:hover {
    background-color: #005f73;
}